<template>
  <div id="app">
    <img src="./assets/logo.png">
    <div>导航：
      <router-link to="/">主页</router-link>
      <router-link to="/Hi">Hi页</router-link>
      <!-- 第二种传值方法 binding -->
      <router-link :to="{name:'Hi1',params:{username:'JSPang', id:'888'}}">Hi页1</router-link>
      <router-link to="/Hi/Hi2">Hi页2</router-link>
    </div>
    <!-- 第一种传值方法 -->
    <p>{{$route.name}}</p>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App'
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
